/*! test 06-01-2017 */
jQuery.Bfw.cart = function() {},
jQuery.Bfw.cart.add = function(a, b, c) {
    $.Bfw.callact("Cart", "AddData", "Cms", {
        prodid: a,
        count: b
    },
    "post",
    function(a) {
        return a.err ? $.Bfw.toastshow(a.data) : void c(a)
    })
},
//租赁商品的添加
jQuery.Bfw.cart.leaseadd = function(a, b, c, d) {
    $.Bfw.callact("Cart", "AddLeaseData", "Cms", {
        leaseprodid: a,
        count: b,
		peroid: c
    },
    "post",
    function(a) {
        return a.err ? $.Bfw.toastshow(a.data) : void d(a)
    })
},
jQuery.Bfw.cart.changenum = function(a, b, c, d) {
    $.Bfw.callact("Cart", "EditData", "Cms", {
        id: a,
        incnumber: b,
        isadd: c
    },
    "post",
    function(a) {
        return a.err ? $.Bfw.toastshow(a.data) : void d()
    })
},
jQuery.Bfw.cart.del = function(a, b) {
    $.Bfw.callact("Cart", "DelData", "Cms", {
        id: a
    },
    "post",
    function(a) {
        return a.err ? $.Bfw.toastshow(a.data) : void b()
    })
},
//删除租赁的艺术品
jQuery.Bfw.cart.leasedel = function(a, b) {
    $.Bfw.callact("Cart", "DelLeaseData", "Cms", {
        id: a
    },
    "post",
    function(a) {
        return a.err ? $.Bfw.toastshow(a.data) : void b()
    })
},
jQuery.Bfw.cart.gettotal = function(a) {
    $.Bfw.callact("Cart", "Count", "Cms", {},
    "post",
    function(b) {
        return b.err ? 0 : void a(b.data)
    })
},
//统计租赁商品数量
jQuery.Bfw.cart.getleasetotal = function(a) {
    $.Bfw.callact("Cart", "LeaseCount", "Cms", {},
    "post",
    function(b) {
        return b.err ? 0 : void a(b.data)
    })
},
jQuery.Bfw.buy = function(a, b, c) {
    location.href = $.Bfw.buildurl("Order", "Confirm", "Cms") + "/prodid/" + a + "/prodcount/" + b + "/special/" + c
},
//购买租赁商品
jQuery.Bfw.leasebuy = function(a, b, c, d) {
    location.href = $.Bfw.buildurl("Order", "LeaseConfirm", "Cms") + "/prodid/" + a + "/prodcount/" + b + "/special/" + c + "/peroid/" + d
},
jQuery.Bfw.addfav = function(a, b) {
    $.Bfw.callact("Favorite", "Add", "Cms", {
        prodid: a
    },
    "post",
    function(a) {
        return a.err ? $.Bfw.toastshow(a.data) : void b(a)
    })
},
jQuery.Bfw.cancelfav = function(a, b) {
    $.Bfw.callact("Favorite", "Cancel", "Cms", {
        prodid: a
    },
    "post",
    function(a) {
        return a.err ? $.Bfw.toastshow(a.data) : void b(a)
    })
},
jQuery.Bfw.addlove = function(a, b) {
    $.Bfw.callact("Love", "Add", "Cms", {
        prodid: a
    },
    "post",
    function(a) {
        return a.err ? $.Bfw.toastshow(a.data) : void b(a)
    })
},
jQuery.Bfw.addfans = function(a, b) {
    $.Bfw.callact("Focus", "Add", "Cms", {
        artistid: a
    },
    "post",
    function(a) {
        return a.err ? $.Bfw.toastshow(a.data) : void b(a)
    })
},
jQuery.Bfw.cancelfans = function(a, b) {
    $.Bfw.callact("Focus", "Cancel", "Cms", {
        artistid: a
    },
    "post",
    function(a) {
        return a.err ? $.Bfw.toastshow(a.data) : void b(a)
    })
},
jQuery.Bfw.gotodetail = function(a, b) {
    return "function" != typeof workdetail || (workdetail(a, b), !1)
};